# Generated by Django 4.0.4 on 2023-03-12 21:38

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.CharField(max_length=64, verbose_name='Ответ')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Категория')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=128, verbose_name='Вопрос')),
                ('is_validated', models.BooleanField(default=False, verbose_name='Одобрен')),
                ('answer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.answer', verbose_name='Правильный ответ')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.category', verbose_name='Тема вопроса')),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Тип')),
            ],
        ),
        migrations.CreateModel(
            name='SubType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Подтип')),
                ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subtypes', to='questions.type', verbose_name='Тип')),
            ],
        ),
        migrations.CreateModel(
            name='Remark',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=128, verbose_name='Замечание')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.question', verbose_name='Вопрос')),
            ],
        ),
        migrations.CreateModel(
            name='QuestionComplaint',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=128, verbose_name='Жалоба')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.question', verbose_name='Вопрос')),
            ],
        ),
        migrations.AddField(
            model_name='answer',
            name='subtype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.subtype', verbose_name='Подтип'),
        ),
    ]
